<style>
    .clearfix:after {
        content: ".";
        display: block;
        clear: both;
        visibility: hidden;
        line-height: 0;
        height: 0;
    }

    .clearfix {
        display: inline-block;
    }

    html[xmlns] .clearfix {
        display: block;
    }

    * html .clearfix {
        height: 1%;
    }
    #news #image_hold {
        padding: 9px 0 0 18px;
    }
    #news #decor {
        float: right;
    }
    #news #image {
        background: url("../img/loader/ajax-loader.gif") no-repeat scroll center center transparent;
        float: left;
        height: 260px;
        width: 406px;
    }
    #news .main {
        height: 198px;
        margin: 0 0 0 18px;
    }
    #news .main .title span {
        color: red;
        float: right;
        font-weight: bold;
        margin: 14px 32px 0 24px;
    }
    #news .main h4 {
        color: #000000;
        font-size: 24px;
        font-weight: bold;
        letter-spacing: -0.5px;
        padding: 20px 0 15px 20px;
        text-transform: uppercase;
        line-height: 30px;
    }
    #news .main p {
        color: #231F20;
        font-size: 14px;
        margin-bottom: 20px;
        overflow: auto;
        padding: 0 5px 0 0;
    }
    #news .main .cont-1, #news .main .cont-2 {
        float: left;
        padding: 15px 0 15px 20px;
        /*width: 309px;*/
        line-height: 21px;
        width: 660px;
    }
    .horizontal-lin {
        background: none repeat scroll 0 0 #EEEEEE;
        height: 2px;
        width: 680px;
    }
    .verical-lin {
        background: none repeat scroll 0 0 #EEEEEE;
        float: left;
        height: 202px;
        width: 1px;
    }
</style>
<div id="heading">
    <div id="headinginner">
        <h1><span>On-site News</span></h1>
        <p class="clear"></p>
    </div>                          
</div>                              
<div id="stage-inner">
    <div class="box nopadding" style="margin-top: 15px; border: 1px solid #D2D0D0; background: #FFFFFF; width: 715px; ">
        <table cellspacing="0" cellpadding="0" class="folder-table">
            <tbody>
                <tr>
                    <td id="minireport" style="width: 100%; padding-bottom: 0;">
                        <div id="news">
                            <div id="image_hold" class="clearfix">
                                <div id="decor"><img src="http://busterminal.me/assets/img/news/en/decor.jpg" width="265" height="260"></div>
                                <div id="image"></div>
                            </div>
                            <div class="main">
                                <div class="title">
                                    <span id="created"></span>
                                    <h4></h4>
                                </div>
                                <div class="horizontal-lin"></div>
                                <div class="cont-1">
                                    <p></p>               
                                </div>
                                <!--<div class="left verical-lin" style="height: 90px; margin: 19px 0 0 8px;"></div> -->
                                <!--<div class="cont-2">
                                <p>
                                Predstava je radena po tekstu Siniše Kova-cevica, u režiji Snežane Šcepanovic Ðurasovic, a igraju Ðordije Tatic, Zoran Rakocevic, Andelija Rondovic i Nikola Šcepanovic.
                                Ulaznice se mogu kupiti na biletarnici KIC-a po cijeni od 2 eura.
                                </p>
                                </div>-->
                                <div class="clear"></div> 
                                <div class="horizontal-lin"></div>
                            </div>
                        </div>
                    </td>
                </tr> 
            </tbody>
        </table>
    </div>  
</div>
<script type="text/javascript">
    $(document).ready(function(){

        /*  AGENCY NEWS SYSTEM ID 
        *   NEWS COUNTER
        *   NEWS DATA
        *   NEWS TOTAL
        */
        var LS_ac_id = 33;
        var cnt=0;
        var news
        var total;

        function citaj_podatke(){
            jQuery.ajax({
                type: 'GET',
                url: base_url+'onsite_news/citaj_podatke/'+LS_ac_id+'/?jsoncall=?',
                dataType: 'jsonp',
                success: function(data){
                    news = data;
                    total = news['jsonp'].length;
                    populate();
                },
                error:function(data){alert("Error: " + data);}
            });
            return false;
        }

        function populate(){
            timeStamp = new Date(news['jsonp'][cnt].created*1000);

            var d = new Date(timeStamp);
            var months = [
            'Jan', 'Feb', 'Mar', 'Apr',
            'May', 'Jun', 'Jul', 'Aug',
            'Sept', 'Oct', 'Nov', 'Dec'
            ];

            var final_date = d.getDate()+'. '+months[d.getMonth()] +' '+ d.getFullYear()+'.';

            jQuery('#news .main .title #created').html('Podgorica<br />'+final_date);
            jQuery('#news .main .title h4').html(news['jsonp'][cnt].title);
            jQuery('#news .main .cont-1 p').html(news['jsonp'][cnt].text);
            if(news['jsonp'][cnt].foto_path==""){
                jQuery('#news .image').html("")    
            }else{
                jQuery('#news #image').html('<img src="'+base_url+'assets/upload/fotografije/'+news['jsonp'][cnt].foto_path+'">');
                //jQuery('#news #image').html('<img width="410" height="260" src="'+base_url+'assets/upload/fotografije/'+news['jsonp'][cnt].foto_path+'">');
            }
        }
        citaj_podatke();
    });
</script>